# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>

pkgname=python-email-validator
pkgver=1.3.1
pkgrel=2
pkgdesc="A robust email address syntax and deliverability validation library"
arch=('any')
url="https://github.com/JoshData/python-email-validator"
license=('custom:CC0')
depends=('python-dnspython' 'python-idna')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::https://github.com/JoshData/python-email-validator/archive/v$pkgver.tar.gz")
sha512sums=('7806ef35c07cf0cfef3d8c6c7fe6dd3cb58da091a134b57d879a2cfcdf6425f8729ab8b03194135749ae47b369da47434c1d130432cfaa8eeaf5d07149c15dc2')

build() {
  cd python-email-validator-$pkgver
  python setup.py build
}

check() {
  cd python-email-validator-$pkgver
  python -m pytest
}

package() {
  cd python-email-validator-$pkgver
  python setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}

# vim:set ts=2 sw=2 et:
